#蓝色心情？定义函数
def greet_user():
    print("Hello!")
greet_user()
def greet_user(username):
    print(f"Hello, {username.title()}")
greet_user('jesen,annie and sudy.')
def describe_pet(animal_type, pet_name):
    print(f"\nI have a {animal_type}.")
    print(f"And its name is {pet_name}.")
describe_pet('cat','lovredancying')
describe_pet('dogger','sim')
describe_pet('longgen','wangyou')
def describe_pet(animal_type, pet_name):
    """显示宠物的信息。"""
    print(f"\nI have a {animal_type}.")
    print(f"My {animal_type}'s name is {pet_name.title()}.")
describe_pet(animal_type='hamster', pet_name='harry')
def describe_pet(pet_name, animal_type='dog'):
    """显示宠物的信息。"""
    print(f"\nI have a {animal_type}.")
    print(f"My {animal_type}'s name is {pet_name.title()}.")
describe_pet(pet_name='willie')
# 一条名为willie的小狗。
describe_pet('wilie')
describe_pet(pet_name='wilie')

# 一只名为Harry的仓鼠。
#describe_pet('harry', 'hamster')
#describe_pet(pet_name='harry', animal_type='hamster')
#describe_pet(animal_type='hamster', pet_name='harry')

#def describe_pet(animal_type, pet_name):
    #"""显示宠物的信息。"""
 #   print(f"\nI have a {animal_type}.")
  #  print(f"My {animal_type}'s name is {pet_name.title()}.")
#describe_pet()
def make_shirt(shirt_size,oolshirts_style):
    print(f"The shirt accept a kind of {shirt_size}")
    print(f"And it signals with {oolshirts_style.title()}")
make_shirt(shirt_size='big',oolshirts_style='printfuiol')
def get_formatted_name(first_name, last_name):
    full_name = f"{first_name} {last_name}"
    return full_name.title()

musician = get_formatted_name('jimi', 'hendrix')
#print(musician)失误示范：
#def get_formatted_name(first_name, middle_name, last_name):
 #   if middle_name:
  #      full_name = f"{first_name} {middle_name} {last_name}"
  #  else:
   #     full_name = f"{first_name} {last_name}"
    #return full_name.title()
#musician = get_formatted_name('john', last_name='hooker')
#print(musician)
#musician = get_formatted_name('john', 'lee', 'hooker')
#print(musician)
def get_formatted_name(first_name, last_name, middle_name=''):

    if middle_name:
        full_name = f"{first_name} {middle_name} {last_name}"
    else:
        full_name = f"{first_name} {last_name}"
    return full_name.title()

musician = get_formatted_name('jimi', 'hendrix')
print(musician)

musician = get_formatted_name('john', 'hooker', 'lee')
print(musician)
